package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name="张三";
        int age=25;
        String gender="男";
        String [] objectinfo={"是一名学生","黑龙江佳木斯的","爱好打篮球"};
        Student zs=new Student(name,age,gender,objectinfo);
        System.out.println(zs);

        FileOutputStream fos=new FileOutputStream("student.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);
        oos.writeObject(zs);
        oos.close();
        System.out.println("写出完毕");


    }
}
